/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.p10.miage.gestionabsence.model;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author huynal
 */
public class Salle {
    
    private int idS;
    private int num;
    private String nom;
    private String batiment;
    private String typeE;

    public Salle() {
    }

    public Salle(int idS, int num, String nom, String batiment, String typeE) {
        this.idS = idS;
        this.num = num;
        this.nom = nom;
        this.batiment = batiment;
        this.typeE = typeE;
    }

    public String getBatiment() {
        return batiment;
    }

    public void setBatiment(String batiment) {
        this.batiment = batiment;
    }

    public int getIdS() {
        return idS;
    }

    public void setIdS(int idS) {
        this.idS = idS;
    }

    public String getNom() {
        return nom;
    }

    public void setNom(String nom) {
        this.nom = nom;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getTypeE() {
        return typeE;
    }

    public void setTypeE(String typeE) {
        this.typeE = typeE;
    }
    
    public void init(ResultSet resultat) throws SQLException{
        this.idS =  resultat.getInt("IDS");
        this.num =  resultat.getInt("NUM");
        this.nom =  resultat.getString("NOM");
        this.batiment =  resultat.getString("BATIMENT");
        this.typeE =  resultat.getString("TYPEE");
    }
}